|
thermostat6 2.2.1
|
API for configuring and manipulating Thermostat 6 Click driver. More...
Topics | |
| Thermostat 6 Registers Settings | |
| Settings for registers of Thermostat 6 Click driver. | |
| Thermostat 6 MikroBUS Map | |
| MikroBUS pin mapping of Thermostat 6 Click driver. | |
Functions | |
| void | thermostat6_cfg_setup (thermostat6_cfg_t *cfg) |
| Thermostat 6 configuration object setup function. | |
| err_t | thermostat6_init (thermostat6_t *ctx, thermostat6_cfg_t *cfg) |
| Thermostat 6 initialization function. | |
| err_t | thermostat6_get_adc_v (thermostat6_t *ctx, float *voltage) |
| Thermostat 6 get adc voltage function. | |
| err_t | thermostat6_get_adc_v_avg (thermostat6_t *ctx, float *voltage, uint16_t num_samples) |
| Thermostat 6 get adc voltage average function. | |
| err_t | thermostat6_get_an_pin_v (thermostat6_t *ctx, float *voltage) |
| Thermostat 6 get AN pin voltage function. | |
| err_t | thermostat6_get_an_pin_v_avg (thermostat6_t *ctx, float *voltage, uint16_t num_samples) |
| Thermostat 6 get AN pin voltage function. | |
| err_t | thermostat6_set_vref (thermostat6_t *ctx, float vref) |
| Thermostat 6 set vref function. | |
| uint8_t | thermostat6_get_relay_pin (thermostat6_t *ctx) |
| Thermostat 6 get relay pin function. | |
| float | thermostat6_get_temperature (float voltage) |
| Thermostat 6 get temperature function. | |
API for configuring and manipulating Thermostat 6 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void thermostat6_cfg_setup | ( | thermostat6_cfg_t * | cfg | ) |
Thermostat 6 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See thermostat6_cfg_t object definition for detailed explanation. |
| err_t thermostat6_get_adc_v | ( | thermostat6_t * | ctx, |
| float * | voltage ) |
Thermostat 6 get adc voltage function.
This function reads raw ADC value and converts it to proportional voltage level.
| [in] | ctx | : Click context object. See thermostat6_t object definition for detailed explanation. |
| [out] | voltage | : Output voltage level [V]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermostat6_get_adc_v_avg | ( | thermostat6_t * | ctx, |
| float * | voltage, | ||
| uint16_t | num_samples ) |
Thermostat 6 get adc voltage average function.
This function reads and averages the ADC voltage for a desired number of samples.
| [in] | ctx | : Click context object. See thermostat6_t object definition for detailed explanation. |
| [out] | voltage | : Output voltage level [V]. |
| [in] | num_samples | : Number of ADC samples. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermostat6_get_an_pin_v | ( | thermostat6_t * | ctx, |
| float * | voltage ) |
Thermostat 6 get AN pin voltage function.
This function reads the voltage from AN pin.
| [in] | ctx | : Click context object. See thermostat6_t object definition for detailed explanation. |
| [out] | voltage | : Output voltage level [V]. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermostat6_get_an_pin_v_avg | ( | thermostat6_t * | ctx, |
| float * | voltage, | ||
| uint16_t | num_samples ) |
Thermostat 6 get AN pin voltage function.
This function reads and averages the AN pin voltage for a desired number of samples.
| [in] | ctx | : Click context object. See thermostat6_t object definition for detailed explanation. |
| [out] | voltage | : Output voltage level [V]. |
| [in] | num_samples | : Number of ADC samples. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | uint8_t thermostat6_get_relay_pin | ( | thermostat6_t * | ctx | ) |
Thermostat 6 get relay pin function.
This function returns the relay pin logic state.
| [in] | ctx | : Click context object. See thermostat6_t object definition for detailed explanation. |
| float thermostat6_get_temperature | ( | float | voltage | ) |
Thermostat 6 get temperature function.
This function calculates temperature in degrees Celsius based on a voltage input using the NTC Thermistor 10k Cylindrical Probe (B57500M0103A005) R/T characteristics map.
| [in] | voltage | : Voltage input for temperature calculation. |
| err_t thermostat6_init | ( | thermostat6_t * | ctx, |
| thermostat6_cfg_t * | cfg ) |
Thermostat 6 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See thermostat6_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See thermostat6_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t thermostat6_set_vref | ( | thermostat6_t * | ctx, |
| float | vref ) |
Thermostat 6 set vref function.
This function sets the voltage reference for Thermostat 6 Click driver.
| [in] | ctx | : Click context object. See thermostat6_t object definition for detailed explanation. |
| [in] | vref | : Reference voltage (volts). |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.